package com.hyt.it.ogt.download.config;

import lombok.Data;

/**
 * @author 刘恒活
 * @since 2021/5/21 17:45
 */
@Data
public class MonitorBizRunTimeException extends RuntimeException {
    private Integer code;
    private String message;
    private String descInfo;
    private Object obj;
    private Throwable exceptionCause;

    public MonitorBizRunTimeException() {
    }

    public MonitorBizRunTimeException(Integer code) {
        this.code = code;
    }

    public MonitorBizRunTimeException(Integer code, String msg) {
        super(msg);
        this.message = msg;
        this.code = code;
    }

    public MonitorBizRunTimeException(Integer code, String msg, Object obj) {
        super(msg);
        this.code = code;
        this.obj = obj;
    }

    public MonitorBizRunTimeException(Throwable cause) {
        this.exceptionCause = cause;
    }

    /**
     * Construct a <code>NestedRuntimeException</code> with the specified detail
     * message and nested exception. 构造子
     *
     * @param msg   the detail message
     * @param cause the nested exception
     */
    public MonitorBizRunTimeException(String msg, Throwable cause) {
        super(msg, cause);
        this.exceptionCause = cause;
    }

}
